package com.xd.cloud.dao.device;

import org.springframework.stereotype.Repository;

import com.xd.cloud.dao.BaseDao;
import com.xd.cloud.entity.device.DeviceSim;

/**   
 * 功能描述：设备-Sim卡对应关系Dao
 * @author: wangshanshan   
 * @date: 2017年12月19日 下午1:37:18 
 */
@Repository
public class DeviceSimDao extends BaseDao<DeviceSim> {
	
	public DeviceSim getObject(int device_id, int sim_id) {
		String hql = "from DeviceSim where device_id = ? and sim_id = ?";
		return get(hql, new Object[]{device_id, sim_id});
	}
	
	public DeviceSim getDeviceSimByDeviceId(int device_id) {
		String hql = "from DeviceSim where device_id = ?";
		return get(hql, new Object[]{device_id});
	}
}